package com.csx.micrometer.invoke.core.outbound.feign;

import com.csx.micrometer.invoke.custom.TagsCustom;
import feign.Capability;
import feign.Client;

import java.util.List;

/**
 * @author cuisongxu
 * @date 2022/12/1 15:34
 */
public class DetectFeignClientCapability implements Capability {

    private final List<TagsCustom> tagsCustoms;

    public DetectFeignClientCapability(List<TagsCustom> tagsCustoms) {
        this.tagsCustoms = tagsCustoms;
    }

    @Override
    public Client enrich(Client client) {
        return new MicrometerFeignClient(client, tagsCustoms);
    }
}
